package com.dm.cloud.auth.service;

import com.dm.cloud.auth.common.mode.AuthUserPermissionSaveModel;
import com.dm.cloud.auth.common.po.AuthPermission;
import com.dm.cloud.core.mode.UserPermission;
import com.dm.cloud.tkmybatis.service.BaseEntityService;
import com.dm.cloud.auth.common.request.AuthPermissionSearchRequest;

import java.util.List;

/**
   * @author hcx
   * @type AuthPermissionService.java
   * @desc AuthPermission service
   */
public interface AuthPermissionService extends BaseEntityService<AuthPermissionSearchRequest,AuthPermission> {

    /**
     * 查询用户相关的权限列表
     * @param roleIds
     * @return
     */
    List<AuthPermission> findPermissionsByRoleIds(List<String> roleIds);

    UserPermission findUserPermissionsByRoleIds(List<String> roleIds);

    Integer saveRolePermission(AuthUserPermissionSaveModel saveModel);

    List<String> getRolePermissions(String roleId);
}
